package com.jsits.v2x.compute.schedule;

import com.jsits.v2x.compute.service.ComputeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MainRoadControlTask {
    @Autowired
    private ComputeService computeService;

    @Scheduled(fixedRate = 500)
    public void updateMainRoadScreen() {
        computeService.updateAllRoad();
    }
}
